Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop misconversion of fractions like 1/100,000 #1268

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

windymilla
Copy link
Collaborator

GG is supposed to convert fractions that don't contain commas, to use super/subscript or Unicode characters.
E.g. 1/2000 will be converted, but 1/2,000 or 1/100,000 should not be. Previous negative lookahead caught 1/2,000 case, but converted the 1/10 in 1/100,000, since there was another digit before the comma.
Fixed by adding optional digits to the negative lookahead.

Fixes #1265

GG is supposed to convert fractions that don't contain commas,
to use super/subscript or Unicode characters.
E.g. 1/2000 will be converted, but 1/2,000 or 1/100,000 should not be.
Previous negative lookahead caught 1/2,000 case, but converted
the 1/10 in 1/100,000, since there was another digit before the
comma.
Fixed by adding optional digits to the negative lookahead.
@windymilla windymilla requested review from cpeel and srjfoo October 18, 2023 14:21
@windymilla
Copy link
Collaborator Author

Testing notes: Fractions that consist solely of digits and a slash (solidus or Unicode fraction slash) should be converted when using Tools, Convert Fractions. However, fractions that contain a comma shouldn't be, e.g. 1/2,000 or 1/100,000
The longer 1/100,000 case wasn't being trapped properly.
Converting a variety of fractions (either the unicode or super/subscripts method) should follow the above rule.

@windymilla windymilla merged commit d16f96c into DistributedProofreaders:master Oct 23, 2023
1 check passed
@windymilla windymilla deleted the fractions branch October 23, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert to Unicode fractions doesn'
3 participants